import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
import Home from '@/page/home'
import Route from '@/page/route'
import Par from '@/page/params'
import Par2 from '@/page/params2'
import Com from '@/page/com/comPage'
import Base from '@/page/com/base'
import Base2 from '@/page/com/base2'
import ToParent from '@/page/com/toParent'
import Is from '@/page/com/is'
import slot from '@/page/com/slot'
import slotName from '@/page/com/slotName'
import starPage from '@/page/com/starPage'
import ClassClass from '@/page/class/classClass'
import Class from '@/page/class/classPage'
import Style from '@/page/class/classStyle'
import ky from '@/page/kuayu'
import action from '@/page/action'
import listcircle from '@/page/listcircle'
import mint from '@/page/mint-ui'
import mintOne from '@/page/mintOne'
import mintTwo from '@/page/mintTwo'
Vue.use(Router)

export default new Router({
  routes: [
    {path: '/', redirect: '/home'},
    {path: '/', name: 'Hello', component: Hello},
    {path: '/home', name: 'Home', component: Home},
    {
      path: '/com', name: 'Com', component: Com, redirect: '/com/base',
      children: [
        {path: 'base', component: Base},
        {path: 'base2', component: Base2},
        {path: 'toParent', component: ToParent},
        {path: 'is', component: Is},
        {path: 'slot', component: slot},
        {path: 'slotName', component: slotName},
        {path: 'star', component: starPage}
      ]
    },
    {
      path: '/route', component: Route,
      children: [
        {path: 'par/:id', component: Par},
        {path: 'par2', component: Par2}
      ]
    },
    {
      path: '/class', component: Class, redirect: '/class/class',
      children: [
        {path: 'class', component: ClassClass},
        {path: 'style', component: Style}
      ]
    },
   {path: '/ky', component: ky},
    {path: '/action', component: action},
    {path: '/listcircle', component: listcircle},
    {
      path: '/mint-ui', component: mint,
      children: [
        {path: 'one', component: mintOne},
        {path: 'two', component: mintTwo}
      ]
    }
  ]
})
